<?php
if($strStyleSheet == TRUE){
	echo "<table class='Normal' border='0' align='center' width='450'>";
}
$strScreenName = 'ListOrderHeader';
$strQueryName = 'qrySearchOrderHeader';
$strFormName = 'frmSearchOrderHeader';

echo "
 <tr>
     <td>
         <table  width='550' cellpadding='0' cellspacing='0' border='0' class='Normal' align='center'>
     <tr align='left'>
         <td align='left' colspan='2'>
             <H2>Search Orders</H2>
         </td>
     </tr>
";
echo (StartForm($strScreenName, "post", $strQueryName,"","","",$strFormName,"",""));
echo "
     <tr>
         <td align='right' colspan='2'>
             <input type='image' src='./images".SITE_SUFFIX."/search.gif' alt='search'>
         </td>
     </tr>
";

echo "
     <tr>
         <td align=\"right\"colspan='1' width='100'>
             <b>Order No. :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtID\" value = '$txtID' size= \"8\" maxlength=\"8\">
         </td>
     </tr>
	<tr>
         <td align='right'>
             <b>Sales Channel :&nbsp;</b>
         </td>
         <td align='left'>";
             CreateDropDown("cboSalesChannel", "SELECT * FROM tblSalesChannel ORDER BY 2", "", $cboSalesChannel);
echo "
         </td>
     </tr>
     <tr align=\"right\">
         <td align=\"right\">
             <b>Customer :&nbsp;</b><br/>
         </td>
         <td align='left'>";
             CreateDropDown("cboCustomer", "SELECT ID, concat(Surname, ', ', FirstName, ' ', ID) FROM tblCustomer ORDER BY 2", "", $cboCustomer);
echo "
         </td>
     </tr>
";
echo "
	<tr>
         <td align=\"right\"colspan='1'>
             <b>Other Info :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtOtherInfo\" value = '$txtOtherInfo' size= \"30\" maxlength=\"100\">
         </td>
     </tr>
     <tr>
         <td align=\"right\"colspan='1'>
             <b>Order Date :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtOrderDate\" value = '$txtOrderDate' size= \"10\" maxlength=\"10\">
			 &nbsp;-&nbsp;<input type=\"text\" name=\"txtOrderDateUpperLimit\" value = '$txtOrderDateUpperLimit' size= \"10\" maxlength=\"10\">
         </td>
     </tr>
";

echo "
     <tr>
         <td align=\"right\"colspan='1'>
             <b>Shipped Date :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShippedDate\" value = '$txtShippedDate' size= \"10\" maxlength=\"10\">
			 &nbsp;-&nbsp;<input type=\"text\" name=\"txtShippedDateUpperLimit\" value = '$txtShippedDateUpperLimit' size= \"10\" maxlength=\"10\">
         </td>
     </tr>
";

echo "
     <tr>
         <td align=\"right\"colspan='1'>
             <b>Invoice Date :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtInvoiceDate\" value = '$txtInvoiceDate' size= \"10\" maxlength=\"10\">
			 &nbsp;-&nbsp;<input type=\"text\" name=\"txtInvoiceDateUpperLimit\" value = '$txtInvoiceDateUpperLimit' size= \"10\" maxlength=\"10\">
         </td>
     </tr>

     <tr>
         <td align=\"right\"colspan='1'>
             <b>Date Paid :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtPaidDate\" value = '$txtPaidDate' size= \"10\" maxlength=\"10\">
			 &nbsp;-&nbsp;<input type=\"text\" name=\"txtPaidDateUpperLimit\" value = '$txtPaidDateUpperLimit' size= \"10\" maxlength=\"10\">
         </td>
     </tr>

     <tr align=\"right\">
         <td align=\"right\">
             <b>Order Status :&nbsp;</b><br/>
         </td>
         <td align='left'>";
             CreateDropDown("cboOrderStatus", "SELECT * FROM tblOrderStatus ORDER BY 2", "", $cboOrderStatus);
echo "
         </td>
     </tr>

     <tr align=\"right\">
         <td align=\"right\">
             <b>Courier :&nbsp;</b><br/>
         </td>
         <td align=\"left\">";
             CreateDropDown("cboCourier", "SELECT * FROM tblCourier ORDER BY 2", "", $cboCourier);
echo "
         </td>
     </tr>

     <tr>
         <td align=\"right\"colspan='1'>
             <b>Freight :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtFreight\" value = '$txtFreight' size= \"8\" maxlength=\"8\">
         </td>
     </tr>

	<tr>
		<td colspan='2'>
			<br/>Delivery Details
		</td>
	</tr>

     <tr>
         <td align=\"right\">
             <b>Name :&nbsp;</b>
		 </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipName\" value = '$txtShipName' size= \"40\" maxlength=\"40\">
         </td>
     </tr>

     <tr>
         <td align=\"right\">
             <b>Address :&nbsp;</b>
		 </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipAddress\" value = '$txtShipAddress' size= \"40\" maxlength=\"60\">
         </td>
     </tr>

     <tr>
         <td align=\"right\">
             <b>Address2 :&nbsp;</b>
		 </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipAddress2\" value = '$txtShipAddress2' size= \"40\" maxlength=\"60\">
         </td>
     </tr>

     <tr>
         <td align=\"right\"colspan='1'>
             <b>City :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipCity\" value = '$txtShipCity' size= \"15\" maxlength=\"15\">
         </td>
     </tr>

     <tr>
         <td align=\"right\"colspan='1'>
             <b>Region :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipRegion\" value = '$txtShipRegion' size= \"15\" maxlength=\"15\">
         </td>
     </tr>

     <tr>
         <td align=\"right\"colspan='1'>
             <b>Postal Code :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipPostalCode\" value = '$txtShipPostalCode' size= \"10\" maxlength=\"10\">
         </td>
     </tr>

     <tr>
         <td align=\"right\"colspan='1'>
             <b>Country :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipCountry\" value = '$txtShipCountry' size= \"15\" maxlength=\"15\">
         </td>
     </tr>
";

echo "
     <tr>
         <td align=\"right\"colspan='1'>
             <b>Phone :&nbsp;</b>
         </td>
         <td align=\"left\"colspan='1'>
             <input type=\"text\" name=\"txtShipPhone\" value = '$txtShipPhone' size= \"24\" maxlength=\"24\">
         </td>
     </tr>
";

echo "
     <tr>
         <td align=\"right\"colspan='2'>
             <input type='image' src='./images".SITE_SUFFIX."/search.gif' alt='search'>
         </td>
     </tr>
     </form>
         </table
     </td>
</tr>
";
	if($strStyleSheet == TRUE){
   		echo "</table>";
	}
?>
